<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>后盾人</title>
  </head>
  <body>
    <script>
      // let hd = 2 ? (3 ? "后盾人" : "hdcms") : 5;
      // console.log(hd);
      function div(options = {}) {
        let div = document.createElement("div");
        div.style.width = options.width ? options.width : "100px";
        div.style.height = options.height ? options.height : "100px";
        div.style.backgroundColor = options.bgcolor ? options.bgcolor : "red";
        document.body.appendChild(div);
      }
      div({ width: "300px", height: "50px", bgcolor: "green" });
    </script>
  </body>
</html>
